function AIEasy() {
	AIRules.call(this);	
	this._action = { allIn:3, raise:1, call:0, check:4, fold:2 };
}
AIEasy.prototype = AIRules.prototype;
AIEasy.prototype.getDo = function(r_room,r_user) {
	//取得电脑牌
	var _user_poker = r_user.properties.get("poker");
	//根据发牌次数取得已发公共牌
	var _deals = parseInt(r_room.getVariable("deals").value);
	var _pub_poker = r_room.properties.get("pubPoker");
	_pub_poker = _pub_poker.slice(0, (_deals + 1));
	//计算电脑牌的权值
	var _sort_user_poker = this.getFormatPoker(_user_poker, _pub_poker);
	var _user_max_poker = this.getMaxRules(_sort_user_poker);
	var _user_weight = this.getPokerWeight(_user_max_poker);	
	var _fold_lv = factorial(3, _deals) +20;
	_fold_lv = Math.floor((100 - parseInt(_user_weight['allIn']['lv'])) * _fold_lv / 200);
	_user_weight['allIn']['lv']  *= 0.5;
	_user_weight['fold'] = { lv:_fold_lv, bv:0 };
	_user_weight['call'] = { lv:50, bv:4 };
	//判断是否添加check
	var _pot = parseInt(r_room.getVariable("pot").value);
	var _call = parseInt(r_room.getVariable("call").value);	
	var _bank = parseInt(r_user.getVariable("bank").value);
	if (_deals != 0 && _pot ==0 && _call == 0) {
		_user_weight['check'] = { lv:50, bv:4 };
		_user_weight['call'] = { lv:0, bv:0 };
	}
	var _action_weight = [];
	for (var _weg in _user_weight) {
		var _obj = [];
		_obj = [_weg, _user_weight[_weg]['lv']];		
		_action_weight.push(_obj);
	}
	var _type = this.getAction(_action_weight);
	var _param = { };
	_param['way'] = this._action[_type];	
	_param['chip'] = 0;
	switch(_type) {
		case "call":
			//跟注别人的check
			if (r_room.getVariable("call").value == 0) {
				_param['way'] = this._action['check'];
			}
			break;
		case "raise":
			//加注别人的加注或allIn
			var _max_blind = r_room.getVariable("maxBlind").value;
			var _user_bet = _call +getRandom(1, 5) * _max_blind;
			_param['chip'] = _user_bet;
			if (_bank <= _user_bet) {
				_param['way'] = this._action['allIn'];
			}			
			break;
		case "allIn":
			_param['chip'] = parseInt(r_user.getVariable("bank").value);
			break;
	}	
	return _param;
}
AIEasy.prototype.getAction = function(r_param) {
	__log.show(r_param);
	var _count = r_param.length;
	_count--;
	while (1==1) {
		var _rand = getRandom(0, _count);
		var _lv = getRandom(0, 100);
		if (r_param[_rand][1] >= _lv) {
			return r_param[_rand][0];
		}
	}	
	return;
}
	/*
	 * 取得可能的权值
	 * @param r_max_poker 电脑可能的最大牌
	 */
AIEasy.prototype.getPokerWeight = function(r_max_poker) {
	var _weight = this._weight;
	var _num = 0;
	var _action = { raise: { lv: 0, bv: 0 }, allIn: { lv: 0, bv: 0 }};			
	for (var _type in _weight) {
		//四条概率
		if (_type == 'FOUR_OF_A_KIND' && r_max_poker[_type] == 1) {
			_action['allIn'] = this.setAction(_action['allIn'], 100, 4);//概率为100，下注金额为大盲注4倍
			_action['raise'] = this.setAction(_action['raise'],100,4);//概率为100，下注金额为大盲注4倍				
		}
		//三條加一對
		if (_type == 'FULL_HOUSE' && r_max_poker[_type] == 1) {
			_action['allIn'] = this.setAction(_action['allIn'], 90, 4);//概率为100，下注金额为大盲注4倍
			_action['raise'] = this.setAction(_action['raise'],90,4);//概率为100，下注金额为大盲注4倍				
		}
		//三條
		if (_type == 'THREE_OF_A_KIND' && r_max_poker[_type] == 1) {
			_action['allIn'] = this.setAction(_action['allIn'], 80, 4);//概率为100，下注金额为大盲注4倍
			_action['raise'] = this.setAction(_action['raise'],80,4);//概率为100，下注金额为大盲注4倍				
		}
		//兩對
		if (_type == 'TWO_TWAIN' && r_max_poker[_type] == 1) {
			_action['allIn'] = this.setAction(_action['allIn'], 70, 4);//概率为100，下注金额为大盲注4倍
			_action['raise'] = this.setAction(_action['raise'],70,4);//概率为100，下注金额为大盲注4倍				
		}
		//一對
		if (_type == 'TWAIN' && r_max_poker[_type] == 1) {
			_action['allIn'] = this.setAction(_action['allIn'], 50, 4);//概率为100，下注金额为大盲注4倍
			_action['raise'] = this.setAction(_action['raise'],50,4);//概率为100，下注金额为大盲注4倍				
		}			
		//同花顺概率
		if (_type == 'FLUSH_WAY') {
			_num =  parseInt(r_max_poker[_type]);
			_action['allIn'] = this.setAction(_action['allIn'], this.factorial(2,_num) * 4, _num);
			_action['raise'] = this.setAction(_action['raise'], this.factorial(2,_num) * 4, _num);
		}
		//顺子
		if (_type == 'WAY') {
			_num =  parseInt(r_max_poker[_type]);
			_action['allIn'] = this.setAction(_action['allIn'], this.factorial(2,_num) * 3, _num);
			_action['raise'] = this.setAction(_action['raise'], this.factorial(2,_num) * 3, _num);
		}			
	}
	return _action;
}
